<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>http::fields</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.Beast">
<link rel="up" href="../ref.html" title="This Page Intentionally Left Blank 2/2">
<link rel="prev" href="boost__beast__http__file_body.html" title="http::file_body">
<link rel="next" href="boost__beast__http__dynamic_body.html" title="http::dynamic_body">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__http__file_body.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__http__dynamic_body.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="beast.ref.boost__beast__http__fields"></a><a class="link" href="boost__beast__http__fields.html" title="http::fields">http::fields</a>
</h4></div></div></div>
<p>
        <a class="indexterm" name="idm44861246767648"></a>
      </p>
<p>
        A typical HTTP header fields container.
      </p>
<h5>
<a name="beast.ref.boost__beast__http__fields.h0"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__fields.synopsis"></a></span><a class="link" href="boost__beast__http__fields.html#beast.ref.boost__beast__http__fields.synopsis">Synopsis</a>
      </h5>
<p>
        Defined in header <code class="literal">&lt;<a href="../../../../../../boost/beast/http/fields.hpp" target="_top">boost/beast/http/fields.hpp</a>&gt;</code>
      </p>
<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">fields</span> <span class="special">=</span> <span class="identifier">basic_fields</span><span class="special">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span> <span class="keyword">char</span> <span class="special">&gt;</span> <span class="special">&gt;;</span>
</pre>
<h5>
<a name="beast.ref.boost__beast__http__fields.h1"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__fields.types"></a></span><a class="link" href="boost__beast__http__fields.html#beast.ref.boost__beast__http__fields.types">Types</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/allocator_type.html" title="http::basic_fields::allocator_type">allocator_type</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  The type of allocator used.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/const_iterator.html" title="http::basic_fields::const_iterator">const_iterator</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  A constant iterator to the field sequence.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/iterator.html" title="http::basic_fields::iterator">iterator</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  A constant iterator to the field sequence.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/key_compare.html" title="http::basic_fields::key_compare">key_compare</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  A strictly less predicate for comparing keys, using a case-insensitive
                  comparison.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields__value_type.html" title="http::basic_fields::value_type">value_type</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  The type of element used to represent a field.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/writer.html" title="http::basic_fields::writer">writer</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  The algorithm used to serialize the header.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__http__fields.h2"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__fields.member_functions"></a></span><a class="link" href="boost__beast__http__fields.html#beast.ref.boost__beast__http__fields.member_functions">Member Functions</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/at.html" title="http::basic_fields::at">at</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns the value for a field, or throws an exception.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/basic_fields.html" title="http::basic_fields::basic_fields">basic_fields</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Constructor. <br> <span class="silver">—</span><br> Move
                  constructor. <br> <span class="silver">—</span><br> Copy
                  constructor.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/begin.html" title="http::basic_fields::begin">begin</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Return a const iterator to the beginning of the field sequence.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/cbegin.html" title="http::basic_fields::cbegin">cbegin</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Return a const iterator to the beginning of the field sequence.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/cend.html" title="http::basic_fields::cend">cend</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Return a const iterator to the end of the field sequence.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/clear.html" title="http::basic_fields::clear">clear</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Remove all fields from the container.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/count.html" title="http::basic_fields::count">count</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Return the number of fields with the specified name.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/end.html" title="http::basic_fields::end">end</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Return a const iterator to the end of the field sequence.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/equal_range.html" title="http::basic_fields::equal_range">equal_range</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns a range of iterators to the fields with the specified name.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/erase.html" title="http::basic_fields::erase">erase</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Remove a field. <br> <span class="silver">—</span><br>
                  Remove all fields with the specified name.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/find.html" title="http::basic_fields::find">find</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns an iterator to the case-insensitive matching field. <br>
                  <span class="silver">—</span><br> Returns an iterator to
                  the case-insensitive matching field name.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/get_allocator.html" title="http::basic_fields::get_allocator">get_allocator</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Return a copy of the allocator associated with the container.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/insert.html" title="http::basic_fields::insert">insert</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Insert a field. <br> <span class="silver">—</span><br>
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/key_comp.html" title="http::basic_fields::key_comp">key_comp</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns a copy of the key comparison function.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/operator_eq_.html" title="http::basic_fields::operator=">operator=</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Move assignment. <br> <span class="silver">—</span><br>
                  Copy assignment.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/operator_lb__rb_.html" title="http::basic_fields::operator[]">operator[]</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns the value for a field, or <code class="computeroutput"><span class="string">""</span></code>
                  if it does not exist. <br> <span class="silver">—</span><br>
                  Returns the value for a case-insensitive matching header, or <code class="computeroutput"><span class="string">""</span></code> if it does not exist.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/set.html" title="http::basic_fields::set">set</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Set a field value, removing any other instances of that field.
                  <br> <span class="silver">—</span><br>
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/swap.html" title="http::basic_fields::swap">swap</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Return a buffer sequence representing the trailers.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/_basic_fields.html" title="http::basic_fields::~basic_fields">~basic_fields</a> <span class="silver">[destructor]</span></strong></span>
                </p>
              </td>
<td>
                <p>
                  Destructor.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__http__fields.h3"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__fields.protected_member_functions"></a></span><a class="link" href="boost__beast__http__fields.html#beast.ref.boost__beast__http__fields.protected_member_functions">Protected
        Member Functions</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/get_chunked_impl.html" title="http::basic_fields::get_chunked_impl">get_chunked_impl</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns the chunked Transfer-Encoding setting.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/get_keep_alive_impl.html" title="http::basic_fields::get_keep_alive_impl">get_keep_alive_impl</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns the keep-alive setting.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/get_method_impl.html" title="http::basic_fields::get_method_impl">get_method_impl</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns the request-method string.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/get_reason_impl.html" title="http::basic_fields::get_reason_impl">get_reason_impl</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns the response reason-phrase string.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/get_target_impl.html" title="http::basic_fields::get_target_impl">get_target_impl</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns the request-target string.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/has_content_length_impl.html" title="http::basic_fields::has_content_length_impl">has_content_length_impl</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns <code class="computeroutput"><span class="keyword">true</span></code> if the
                  Content-Length field is present.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/set_chunked_impl.html" title="http::basic_fields::set_chunked_impl">set_chunked_impl</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Adjusts the chunked Transfer-Encoding value.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/set_content_length_impl.html" title="http::basic_fields::set_content_length_impl">set_content_length_impl</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Sets or clears the Content-Length field.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/set_keep_alive_impl.html" title="http::basic_fields::set_keep_alive_impl">set_keep_alive_impl</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Adjusts the Connection field.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/set_method_impl.html" title="http::basic_fields::set_method_impl">set_method_impl</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Set or clear the method string.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/set_reason_impl.html" title="http::basic_fields::set_reason_impl">set_reason_impl</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Set or clear the reason string.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/set_target_impl.html" title="http::basic_fields::set_target_impl">set_target_impl</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Set or clear the target string.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__http__fields.h4"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__fields.friends"></a></span><a class="link" href="boost__beast__http__fields.html#beast.ref.boost__beast__http__fields.friends">Friends</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody><tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__basic_fields/swap.html" title="http::basic_fields::swap">swap</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Swap two field containers.
                </p>
              </td>
</tr></tbody>
</table></div>
<p>
        This container is designed to store the field value pairs that make up the
        fields and trailers in an HTTP message. Objects of this type are iterable,
        with each element holding the field name and field value. Field names are
        stored as-is, but comparisons are case-insensitive. The container behaves
        as a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">multiset</span></code>; there will be a separate value
        for each occurrence of the same field name. When the container is iterated
        the fields are presented in the order of insertion, with fields having the
        same name following each other consecutively. Meets the requirements of
        <span class="emphasis"><em>Fields</em></span>
      </p>
<h5>
<a name="beast.ref.boost__beast__http__fields.h5"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__fields.template_parameters"></a></span><a class="link" href="boost__beast__http__fields.html#beast.ref.boost__beast__http__fields.template_parameters">Template
        Parameters</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Type
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody><tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">Allocator</span></code>
                </p>
              </td>
<td>
                <p>
                  The allocator to use.
                </p>
              </td>
</tr></tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__http__fields.h6"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__fields.description"></a></span><a class="link" href="boost__beast__http__fields.html#beast.ref.boost__beast__http__fields.description">Description</a>
      </h5>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2016-2019 Vinnie
      Falco<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__http__file_body.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__http__dynamic_body.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
